#pragma once
#include <unordered_map>
#include <mutex>
#include <memory>
#include <vector>
#include <functional>
#include "Message.pb.h"

namespace MY_MQ{
    using ConsumerCallback = std::function<void(const std::string, const  MQ_Protobuf::BasicProperties *bp, const std::string)>;
    struct Consumer {
        using self_ptr = std::shared_ptr<Consumer>;
        std::string tag;    //消费者标识
        std::string qname;  //消费者订阅的队列名称
        bool auto_ack;      //自动确认标志
        ConsumerCallback callback;

        Consumer(){
        }
        Consumer(const std::string &ctag, const std::string &queue_name,  bool ack_flag, const ConsumerCallback &cb):
            tag(ctag), qname(queue_name), auto_ack(ack_flag), callback(std::move(cb)) {
        }
        ~Consumer() {
        }
    };
};